public class J1404 {
    public static void main(String[] args) {
        int i = 15;
        int j = 25;
        while((j % i) != 0){
            int tmp = j % i;
           if(tmp >= i){
               j = tmp;
           }
           else{
               j = i;
               i = tmp;
           }
        }
        System.out.println(i);
    }
}
